package org.example.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author TonySong
 * @date 2024/5/6 0006
 * @time 15:10
 */
@Controller
public class IndexController {

    @GetMapping("/list")
    public String list(){
        //forward:forward ：数据的转发
        return "list";//list.html

    }

    @GetMapping("/add")
    public String add(){
        //redirect：重定向
        return "redirect:/list";
    }
}
